-module(srv_interface).
-include("subscriber.hrl").
-export([do/3]).
do(Srv,Method,Parameter) ->
	rfc4627:encode(to_json_obj(apply(Srv,Method,Parameter))).

to_json_obj(A) when is_list(A) ->
	lists:map(fun(Item)->
				to_json_obj(Item)
			  end,
			  A);
to_json_obj(A) when is_record(A,sub_lte) ->
	{obj,[{"test","test"}]};
to_json_obj(A) ->
	{obj,[{"unknown","unknown"}]}.
	